#!/bin/bash -e

function info() {
echo Usage: `basename $0` 'vcf'
exit 1
}

while getopts  ":p:f:i:" opt; do
    case  $opt  in
        p) out_prefix=$OPTARG;;
        f) suffix=$OPTARG;;
        i) interval=$OPTARG;;
        *) info;;
    esac
done
shift $(($OPTIND - 1))


if [ $# -lt 1 ]; then info; fi

. $var

test -n "$interval" && interval="--targets-file $interval"

bcftools call -Ov \
--multiallelic-caller \
--keep-alts \
-fGQ,GP \
$interval \
$1 > $out_prefix.bcf.vcf


. $cmd_done
